import React from 'react'

const Menu = () => {
  // 获取当前路由的地址
  const location = React.Router.useLocation()
  const { pathname } = location

  const SwtichTab = async (url: string) => React.navigate(url)

  return (
    <div className="footer">
      <React.UI.TabBar activeKey={pathname} onChange={SwtichTab}>
        <React.UI.TabBar.Item key={"/"} icon={<React.ICON.FolderOutline />} title={"首页"} />
        <React.UI.TabBar.Item key={"/business/index"} icon={<React.ICON.UserOutline />} title={"我的"} />
      </React.UI.TabBar>
    </div>
  )
}

export default Menu
